
import request from '@/utils/request'

/**
 * 查询渠道列表
 * @param {*} query 
 * @returns 
 */
export function listChannel(query) {
    return request({
        url: '/channelInfo/selectPage',
        method: 'get',
        params: query
    })
}

/**
 * 删除渠道
 * @param {*} query 
 * @returns 
 */
export function delChannel(query) {
    return request({
        url: '/channelInfo/del',
        method: 'get',
        params: query
    })
}


/**
 * 添加编辑渠道
 * @param {*} query 
 * @returns 
 */
export function saveChannel(query) {
    return request({
        url: '/channelInfo/save',
        method: 'post',
        data: query
    })
}

/**
 * 渠道详情
 * @param {*} query 
 * @returns 
 */
export function getChannelDetail(query) {
    return request({
        url: '/channelInfo/getDetail',
        method: 'get',
        params: query
    })
}


/**
 * 渠道状态修改
 */
export function updateStatus(query) {
    return request({
        url: '/channelInfo/updateStatus',
        method: 'get',
        params: query
    })
}


/**
 * 重置渠道密码
 * @param {*} query 
 * @returns 
 */
export function resetChannelUser(query) {
    return request({
        url: '/channelInfo/resetChannelUser',
        method: 'get',
        params: query
    })
}


/**
 * 机构渠道过滤信息
 * @param {*} query 
 * @returns 
 */
export function selectChannelFilter(query) {
    return request({
        url: '/organizationChannel/selectPage',
        method: 'get',
        params: query
    })
}


/**
 * 添加编辑
 * @param {*} query 
 * @returns 
 */
export function saveOrganizationChannel(query) {
    return request({
        url: '/organizationChannel/save',
        method: 'post',
        data:query
    })
}


export function delOrganizationChannel(query) {
    return request({
        url: '/organizationChannel/del',
        method: 'get',
        params:query
    })
}

export function detailOrganizationChannel(query) {
    return request({
        url: '/organizationChannel/getDetail',
        method: 'get',
        params:query
    })
}

/**
 * 渠道日报分页列表
 * @param {*} query 
 * @returns 
 */
export function selectChannelBillPage(query) {
    return request({
        url: '/channelInfo/selectChannelBillPage',
        method: 'get',
        params:query
    })
}
